﻿<include file="./Tpl/Admin/header.html" />
<div class="main">
	<div class="main_title">
		<img src="/Public/Admin/images/book1.gif"/>&nbsp;&nbsp;中元币认购
	</div>
	<eq name="module" value="list">
	<div class="list_body">
	    <form action="?s=Admin/Buy/delAll" method="post" id="formid">
	   	<table cellspacing=0 cellpadding=0 border=0>
		    <tr>
			   <!--th width="5%">选择</th--><th width="10%">会员名</th><th width="10%">认购总量</th><th width="20%">当前还剩</th><th width="20%">认购价格</th><th width="20%">认购时间</th><th width="10%">状态</th><!--th width="10%">操作</th-->
			</tr>
			<volist name="list" id="vo">
			<tr>
			   <!--td><input type="checkbox" class="id" name="id[]" value="{$vo.id}"></td--><td>{$vo.username|default='0'}</td><td>{$vo.num|default='0'}</td><td>{$vo.nownum|default='0'}</td><td>{$vo.price|default='0'}</td><td>{$vo.addtime|default='无'}</td><td>{$vo.status}</td><!--td><a href="?s=Admin/Buy/set/id/{$vo.id}">修改</a> <a href="?s=Admin/Buy/del/id/{$vo.id}">删除</a--></td>
			</tr>
			</volist>
			<tr>
			    <td colspan=7 class="page">
				    <!--input type="button" id="all" value=" 全选 ">
					<input type="button" id="all_return" value=" 全不选 ">
					<input type="button" id="dels" value=" 批量删除 ">
					<input type="button" id="add" value=" 添加 "-->
					<a href="?s=Admin/Buy/index/page/1">首页</a>
					<a href="?s=Admin/Buy/index/page/{$page-1}">上一页</a>
					<a href="?s=Admin/Buy/index/page/{$page+1}">下一页</a>
					<a href="?s=Admin/Buy/index/page/{$page_num}">尾页</a>
                </td>
			</tr>
		</table>
	</div>
	<else/>
	<div class="main_body">
		<form action="?s=Admin/Buy/update" method="post">
		<input type="hidden" name="id" value="{$id}"/>
		<input type="hidden" name="issueid" value="{$issueid}"/>
		<table cellspacing=0 cellpadding=0 border=0>
		<tr><td>认购价格</td><td><input type="text" name="price" readonly value="{$price|default=0}"/></td></tr>
		<tr><td>限购数量</td><td><input type="text" name="limit" readonly value="{$limit|default=0}"/></td></tr>
		<tr><td>认购数量</td><td><input type="text" name="num" value="{$num|default=0}"/></td></tr>
		</table>
		<div><input type="submit" value="提交"/></div>
		</form>
    </div>
	</eq>
</div>
<include file="./Tpl/Admin/footer.html" />
<script language="javascript" src="/Public/plugin/kindeditor/jquery.tools.min.js"></script>
<script language="javascript">
$(document).ready(function(){
    $('#all').click(function(){
	    $('.id').attr('checked',true);
	});
	$('#all_return').click(function(){
	    $('.id').attr('checked',false);
	});
    $('#dels').click(function(){

		f = 0;
	    $('.id').each(function(){
		    if($(this).attr('checked')) f = 1;
		});
		
        if(f==0){
		    alert('请选择要删除的项！');
		}else{
		    $('#formid').submit();
		}
	});
	$('#add').click(function(){
	    location.href="?s=Admin/Buy/add";
	});
});
</script>